package org.gy.T13;

public class Test {
    public static void main(String[] args) {
//想唱歌的时候，A类对象就表现为Singer类型
        Singer s = new A() {
            @Override
            public void driver() {

            }
        };
        s.sing();

//想开⻋的时候，A类对象就表现为Driver类型
        Driver d = new A() {
            @Override
            public void driver() {

            }
        };
        d.drive();
    }
}
